# -*- coding:utf-8 -*-
class Solution:
    def Fibonacci(self, n):
        # write code here
        if n == 0:
            return 0
        if n == 1:
            return 1
        Fib = [0, 1]
        for _ in range(n-2):
            res = sum(Fib)
            Fib.append(res)
            Fib.pop(0)
        return sum(Fib)